Control of body electrical activity by magnetic fields

ABSTRACT

Apparatus ( 40 ) for generating a localized magnetic field inside a body of a living subject ( 44 ) includes first and second electromagnets ( 46,48 ), adapted to be positioned in proximity to the body so as to apply magnetic fields thereto. The core ( 50 ) of at least one of the electromagnets has a shape that can be altered under control of an operator of the apparatus so as to adjust the magnetic fields to assume a desired relation within the body.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the benefit of U.S. Provisional PatentApplication No. 60/267,140, filed Feb. 8, 2001, which is incorporatedherein by reference.

FIELD OF THE INVENTION

The present invention relates generally to devices and methods forgenerating magnetic fields in living body tissues, and specifically todevices and methods for inducing electrical pulses in body tissues bytargeted electromagnetic radiation.

BACKGROUND OF THE INVENTION

A wide scope of human diseases and medical conditions are amenable totreatment by electric pulses delivered to specific areas of internalbodily organs or cells. Conditions that have been treated in thisfashion include cardiac diseases, disorders of the brain (neurologicaland psychiatric), conditions of the spinal cord and peripheral nerves,and muscular disorders, to mention just a few.

In conditions of heart disease, such as acute myocardial infarction(MI), for example, the heart may go into ventricular fibrillation (VF).VF is typically treated by a prompt delivery of direct-current (DC)electrical shock to the patient's chest, known as defibrillation. Inless acute disease conditions, cardiac arrhythmias may occur thatrequire application of a milder DC shock for cardioversion. For extendedtreatment of arrhythmias, an artificial pacemaker is commonly used tocontrol the heart rate. For this purpose, a suitable electrode istypically inserted into the heart by means of a catheter passed throughthe patient's venous system.

External defibrillation devices are typically based on discharge of ahigh-voltage, high-energy pulse (360 Joules for VF) from a capacitor.The strong pulse is needed in order to overcome the electricalresistance of body tissues and provide a sufficient stimulus to thepatient's heart. To deliver the DC shock, a skilled operator smears aconductive protective gel on two large paddles and places them properlyon the patient's chest, one over the heart base, the second over theheart apex. The operator ensures that no one is touching the patient,and then presses a button on each paddle to discharge the pulse intopatient's chest. The results are typically observed on aelectrocardiograph (ECG). As the electrical energy is only crudelydirected to the heart, this routine may have to be repeated severaltimes before the normal heart rhythm is recovered. This procedure causestrauma to the patient and entails a risk of severe electric shock to thetreating personnel.

Attempts have been made to deliver electrical currents directly to thehuman heart or other internal body organs without surgical invasion orexternal electrical contacts, by applying a varying magnetic field tothe body. For example, U.S. Pat. No. 4,723,536, whose disclosure isincorporated herein by reference, describes a device for heartpacemaking and pain reduction using external magnetic fields. Anelectromagnet comprising a wire coil is applied to the patient's bodyadjacent to the heart (for pacemaking) or to the head (for painreduction). An alternating electrical current is applied to the coil inorder to generate the desired magnetic field. The inventors indicatethat the magnetic field intensity at the poles of the electromagnet thatis needed in order to pace a human heart is 0.5 to 2.0 Gauss.

U.S. Pat. No. 5,170,784, whose disclosure is also incorporated herein byreference, describes a magnetic cardiac pacemaker using biphasic pulsesof mixed frequencies and waveforms that are applied to a field coil, inorder to generate magnetic pulses of relatively low intensity (less than200 Gauss) without the use of leads. The device can be worn externallyon the chest near the heart to enable the magnetic field to penetratethe body and control the heart muscle as a non-invasive cardiacpacemaker, or it can be inserted subcutaneously for long-term pacing.

U.S. Pat. No. 4,056,097, whose disclosure is likewise incorporatedherein by reference, describes a contactless electromagnetic stimulustransducer, made of two curved ferromagnetic pole pieces with electriccoils wound thereon. The pole pieces are designed to encircle (at leastpartially) the chest or the head of the patient, and are hinged in orderto allow the distance between them to be adjusted. The electric coilsare connected in opposition, so that the pole pieces generate opposingmagnetic fields in the patient's body.

SUMMARY OF THE INVENTION

It is an object of some aspects of the present invention to provideimproved devices and methods for applying magnetic fields to internalbody organs.

In preferred embodiments of the present invention, at least oneelectromagnet with a shapeable core is used to apply a magnetic field totarget in the body, typically in an organ such as the heart. The core,preferably comprising a ferromagnetic material, may include one or moreflexible joints, or it may alternatively be made of a flexible material,such as a deformable plastic with ferromagnetic properties. Typically, apair of electromagnets are applied to opposing sides of the body,wherein one or both of the electromagnets have such flexible cores. Anoperator adjusts the positions and shapes of the cores so as to generatea focused magnetic field at the target. The windings of theelectromagnets are preferably driven with alternating currents, mostpreferably pulsed currents, so that the magnetic field at the target ispulsed, as well. The pulsed magnetic field causes electrical currentpulses to be generated in the tissue, for use in pacing ordefibrillating the heart, for example, or for treatment or diagnosis ofother body organs, such as the brain, nervous system or muscles.

The use of an electromagnet with a flexible core allows the operator totarget and focus the magnetic field within the body with much greaterprecision than is afforded by methods for magnetic stimulation that areknown in the art. Consequently, a higher magnetic flux is achieved ontarget, resulting in a stronger electrical current pulse in the tissue,and therefore more effective therapeutic or diagnostic stimulation.

There is therefore provided, in accordance with a preferred embodimentof the present invention, apparatus for generating a localized magneticfield inside a body of a living subject, the apparatus including:

a first electromagnet, including a first core and a first windingsurrounding the first core, and adapted to be positioned in proximity tothe body so as to apply a first magnetic field thereto;

a second electromagnet, including a second core and a second windingsurrounding the second core, and adapted to be positioned in proximityto the body so as to apply a second magnetic field thereto, the secondcore having a shape that can be altered under control of an operator ofthe apparatus so as to adjust the second magnetic field to assume adesired relation to the first magnetic field; and

driving circuitry, coupled to apply an electrical current to the firstand second windings in order to generate the first and second magneticfields.

Preferably, the electrical current includes a pulsed current, wherebyapplication of the current to the windings causes the first and secondmagnetic fields in the body to be pulsed.

Further preferably, the second magnetic field is adjusted in the desiredrelation so as to generate a region of focused magnetic flux due to thefirst and second magnetic fields within the body. Most preferably, thefirst and second electromagnets are positioned and at least the secondmagnetic field is adjusted so that the focused magnetic flux causes anelectrical potential to be generated in a selected organ of the body.

In a preferred embodiment, the selected organ includes a heart, and thefirst and second electromagnets are positioned and adjusted and theelectrical current is controlled so that the electrical potential causespacing of the heart. Alternatively, the first and second electromagnetsare positioned and adjusted and the electrical current is controlled sothat the electrical potential causes defibrillation of the heart.Preferably, the apparatus includes a device for observing performance ofthe heart and generating an output signal responsive thereto, whereinthe first and second magnetic fields are adjusted responsive to theoutput signal.

Preferably, the shape of the first core can also be altered undercontrol of the operator of the apparatus so as to adjust the firstmagnetic field.

There is also provided, in accordance with a preferred embodiment of thepresent invention, apparatus for generating a localized magnetic fieldinside a body of a living subject, the apparatus including:

an electrical winding, which is adapted to be driven by an electricalcurrent so as to generate a magnetic field in the body; and

a core, upon which the winding is wound, the core including at leastfirst and second ferromagnetic sections and a joint that connects thesections one to another, such that the joint is adjustable under controlof an operator of the apparatus so as to direct lines of flux of themagnetic field within the body.

There is additionally provided, in accordance with a preferredembodiment of the present invention, apparatus for generating alocalized magnetic field inside a body of a living subject, theapparatus including:

an electrical winding, which is adapted to be driven by an electricalcurrent so as to generate a magnetic field in the body; and

a core, upon which the winding is wound, the core including a flexibleferromagnetic material, which is adapted to be bent under control of anoperator of the apparatus so as to direct lines of flux of the magneticfield within the body.

Preferably, the flexible ferromagnetic material includes a deformableplastic matrix and particles of a ferromagnetic substance contained inthe matrix. Alternatively, the flexible ferromagnetic material includesa deformable container, a fluid held within the container, and particlesof a ferromagnetic substance suspended in the fluid. In a preferredembodiment, the core includes multiple lobes of the flexibleferromagnetic material, which are adapted to be bent individually torespective angles.

There is further provided, in accordance with a preferred embodiment ofthe present invention a method for generating a localized magnetic fieldinside a body of a living subject, the method including:

positioning a first electromagnet, including a first core and a firstwinding surrounding the first core, in proximity to the body so as toapply a first magnetic field thereto;

positioning a second electromagnet, including a second core and a secondwinding surrounding the second core, in proximity to the body so as toapply a second magnetic field thereto; and

modifying a shape of at least one of the cores so that the first andsecond magnetic fields assume a desired relation one to another withinthe body.

In a preferred embodiment, the selected organ includes a heart, and themethod includes observing performance of the heart and generating anoutput signal responsive thereto, wherein the first and secondelectromagnets are positioned and the shape of the at least one of thecores is modified responsive to the output signal.

The present invention will be more fully understood from the followingdetailed description of the preferred embodiments thereof, takentogether with the drawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic side view of apparatus for generating a focusedmagnetic field, as is known in the art;

FIGS. 2A and 2B are schematic, pictorial, top and frontal views,respectively, of a system for applying magnetic stimulation to the heartof a subject, in accordance with a preferred embodiment of the presentinvention;

FIGS. 3A and 3B are schematic top and side views, respectively, of anelectromagnet with a jointed core, in accordance with a preferredembodiment of the present invention;

FIG. 4 is a schematic top view of an electromagnet with a jointed core,in accordance with another preferred embodiment of the presentinvention;

FIGS. 5–8 are schematic top views of electromagnets with cores made offlexible materials, in accordance with a number of preferred embodimentsof the present invention; and

FIG. 9 is a schematic, pictorial illustration of a system for treatmentof the heart using magnetic stimulation, in accordance with a preferredembodiment of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

FIG. 1 is a schematic side view of apparatus 20 for generating a focusedmagnetic field, as is known in the art. The apparatus comprises twoelectromagnets 22 and 24, having cylindrical inductive coils 26 woundaround generally cylindrical ferromagnetic cores 28. The two coils areconnected in opposition to a source of direct or alternating current(not shown). As a result, the north (N) and south (S) poles of the twocoils are aligned, as shown in the figure. In the configuration of FIG.1, cores 28 are curved, so that the magnetic fields are focused in atarget zone 30 between the poles on the concave side of the cores.Within zone 30, the magnetic field intensity is generally strong androughly uniform. It will be observed, however, that if the spacing orrelative angle between electromagnets 22 and 24 changes significantly,the lines of magnetic field will no longer be focused in zone 30, andthe strength and uniformity of the field in the zone will be adverselyaffected.

FIGS. 2A and 2B are schematic, pictorial illustrations of a system 40for generating focused magnetic fields within a heart 42 of a humansubject 44, in accordance with a preferred embodiment of the presentinvention. FIG. 2A is a top view of the system, while FIG. 2B is afrontal view, both showing the location of heart 42 within the subject'schest. A pair of electromagnets 46 and 48 are placed behind and in frontof subject 44, respectively. Each of the electromagnets comprises aflexible core 50, on which a coil 52 is wound. Different types of coresmay be used for this purpose. Some exemplary types are described withreference to the figures that follow. Coils 52 are connected inopposition to a current source, like coils 26 in FIG. 1, therebygenerating a focused magnetic field in heart 42.

Cores 50 can be shaped by an operator of system 40, unlike cores 28 thatare used in systems known in the art. Mounting devices 54, such asbrackets or other suitable mounting hardware, are preferably provided inorder to hold electromagnets 46 and 48 in the desired shape and placeduring treatment. (For simplicity of illustration, only the mountingdevice for electromagnet 48 is shown in the figures.) The operator canthus adjust the positions and orientations of electromagnets 46 and 48,together with the positions and bending angles of the cores, so that thelines of magnetic field are precisely focused in heart 42.Alternatively, mounting devices 54 may be electromechanicallycontrolled, and may be capable of adjusting the positions and anglesautomatically.

Generally speaking, the operator or automated control system draws thepoles of the electromagnets closer together or farther apart, andchanges the relative angles of the poles, depending on the size andshape of the subject's body and the location of the organ in which themagnetic field is to be focused. Electromagnets 46 and 48 may also beturned to different orientation angles, in order to control the angularorientation of the magnetic field lines in heart 42. Coils 52 arepreferably driven by a pulsating electrical current, so as to generatinga pulsed, focused magnetic field in the body. The pulsed magnetic field,in turn, induces electrical pulses in the tissue of heart 42, havingamplitude, frequency and shape that depend on the amplitude, frequencyand waveform of the current driving the coils. Further details regardingthe use of system 40 in treating the heart, as well as other organs, aredescribed hereinbelow with reference to FIG. 9.

Although only two electromagnets 46 and 48 are shown in FIGS. 2A and 2B,three or more electromagnets with flexible cores may be disposed aroundthe body of subject 44, and may be shaped and aligned together to give astronger, focused magnetic field in heart 42 or in another targetlocation. A larger number of coils allows better stabilization,directing and focusing of the magnetic field but is harder to align andmanipulate in practice. Alternatively, a single electromagnet with aflexible core may be used in some applications.

FIGS. 3A and 3B show an electromagnet 60 with cylindrical inductive coil52 wound on a laminated core 62, in accordance with a preferredembodiment of the present invention. FIG. 3A is a top view (as seen inthe perspective of FIG. 2A), while FIG. 3B is a side view. Core 62 isformed from parallel sheets of a suitable ferromagnetic material, as isknown in the art. The core comprises a central part that is largelycontained within coil 52, connected to two articulating extremities 64by joints 66. The operative configuration of electromagnet 60 ischaracterized by two bending angles α₁ and α₂ formed between the axis ofthe central part and the axes of extremities 64. The two angles areindependently adjustable by the operator, who then fixes the angles inplace when the magnetic field is focused in the desired location.

FIG. 4 is a schematic top view of another electromagnet 70 with anarticulated core, in accordance with a preferred embodiment of thepresent invention. The core in this case comprises two arms 72 and 74,connected by joint 66. Arms 72 and 74 are wound with respective coils 76and 78, which are connected so as to have the same current directionaround the core. The operative configuration of this electromagnet ischaracterized by one angle α formed between the axes of arms 72 and 74.

FIG. 5 is a schematic top view of an electromagnet 80 whose core 82 ismade of a flexible material, in accordance with a preferred embodimentof the present invention. Typically, core 82 comprises a compositeferromagnetic material, made of a ferromagnetic powder filler, forexample, in a plastic base, such as a polymeric material, allowing thecore to be deformed by the operator. Various methods are known in theart for making magnetic cores using ferromagnetic powders in a plasticmatrix. Exemplary methods are described in U.S. Pat. Nos. 4,022,701,4,678,616 and 5,160,447, whose disclosures are incorporated herein byreference. Whereas the typical magnets described in these patents aremechanically stiff, the methods of manufacture described in thesepatents can easily be adapted to produce a flexible magnetic core, bymixing the ferromagnetic powder into a matrix of suitable flexibleplastic material.

Alternatively, core 82 may be produced by suspending a ferromagneticpowder in a viscous fluid or other vehicle, and enclosing the suspensionin a flexible tube that is adapted to preserve its deformed state.

In either case, the operator can bend extremities 84 and 86 so that theyassume deformed positions characterized by respective angles α₁ and α₂.In this case, the angles are measured between the perpendiculars to theside faces of the extremities in their deformed and non-deformedpositions (as shown by broken lines in FIG. 5)

FIG. 6 is a schematic top view of an electromagnet 90, comprising dualinductive coils 76 and 78, with a deformable magnetic core 92, inaccordance with a preferred embodiment of the present invention. Coreextremities 84 and 86 can in this case be bent so that the operator isable to manipulate three angles: α₁, α₂ and α₃.

FIG. 7 is a schematic top view of an electromagnet 100, in accordancewith another preferred embodiment of the present invention. In thisembodiment, a coil 102 itself has a curved shape, corresponding to thecurvature of the central part of core 104. As a result, theelectromagnet is characterized by an initial bend angle α₀. This is thetype of coil that is used in electromagnets 46 and 48, shown in FIGS. 2Aand 2B, and which may similarly be used in combination withsubstantially any of the core configurations shown in FIGS. 3–6. Theoperator of electromagnet 100 is able to bend extremities 84 and 86 inorder to achieve the desired overall bend.

FIG. 8 is a schematic top view of an electromagnet 110, in accordancewith yet another preferred embodiment of the present invention. Asillustrated by this embodiment, the extremities of core 112 may havedifferent shapes suitable for focusing of the magnetic field indifferent cases. For example, one or both extremities may be split intoa number of individually-deformable lobes 114. Additionally oralternatively, if the material of the deformable core has some residualelasticity or does not stably maintain its deformed state for some otherreason, a mechanical bracket 116 of non-magnetic material may be used tofix the core extremities at the desired angles.

FIG. 9 is a schematic, pictorial view of a computerized system 120 forgenerating a controlled magnetic field in heart 44, in accordance with apreferred embodiment of the present invention. Besides electromagnets 46and 48 (as described above with reference to FIGS. 2A and 2B), thesystem comprises an electric waveform generator 122, a computer console124, and an electrocardiograph (ECG) 126 with electrode 128. (Typically,multiple ECG electrodes are used, as is known in the art, but for thesake of simplicity, only one electrode is shown here.) ECG 126 is usedto observe the electrical activity of heart 44 prior to treatment bysystem 120, and then to monitor the effect of the magnetic fieldsgenerated by the system on the heart. Optionally, an imaging device,such as an ultrasound echograph 130 with a transducer 132, is used toform an image 134 of heart 44. This image is useful both in accuratelydetermining the position of the heart, and as a further means forobserving the effect of the magnetic fields on the heart. Some or all ofwaveform generator 122, ECG 126 and echograph 130 may be merged withconsole 124 in a single, integrated unit.

Prior to treatment, console 124 preferably receives signal inputs fromECG 126 and echograph 130, as well as manual input from an operator ofsystem 120. The console is programmed with software capable ofdetermining, based on these inputs, the desired focal point of themagnetic fields in the body of subject 42, and the strength of themagnetic field to be generated there. Based on this determination, theconsole outputs a combination of treatment parameters, which typicallyinclude:

-   -   □ Positions and orientations of electromagnets 46 and 48        relative to the body of subject 42.    -   □ Shape parameters of the electromagnets, such as bending angles        α_(i).    -   □ Electrical current amplitude and waveform (and/or frequency)        to be delivered from waveform generator 122 to the coils of the        electromagnets.

These parameters may then be implemented manually by the operator, orthey may be applied automatically by console 124, by controllingwaveform generator 122 and mounting device 54 (FIG. 2B). The console orthe operator may vary the parameters during treatment until the desiredeffect on the heart is observed.

In the configuration shown in FIG. 9, system 120 has a range ofdifferent applications, including:

-   -   Leadless electrical pacing of heart 44, without electrode        insertion. The electrical pulse generated by the magnetic fields        is directed, preferably by echocardiogram imaging, to a        pre-selected target in the heart. Typically, pulsed magnetic        fields between 0.01 and 0.1 tesla are sufficient to pace the        heart, although other field strength values may also be used.    -   Directed electrical shock to the heart muscle to induce        cardioversion and/or defibrillation, for treatment of more        severe heart rhythm disturbances. Typically, magnetic fields of        roughly 1 tesla are sufficient to defibrillate the heart,        although here, too, other field strength values may also be        used.    -   Non-invasive cardiac electro-physiological study. Electromagnets        46 and 48 induce stimulating electrical pulses to specific        locations in the heart without insertion of electrodes. The        response of the heart to the stimuli is recorded by ECG 126        and/or echograph 130. The type and focus of treatment subsequent        to the study is determined by the ECG and/or echographic        response pattern.    -   Non-invasive electrical ablation of abnormal sites in the heart.        Such sites typically interfere with the heart's normal pulse        generation or pulse conduction system and thus cause        abnormalities in the heart rhythm. A focused, pulsed magnetic        field of sufficient strength will induce a local electrical        pulse in the heart that is capable of ablating the abnormal        site, thus alleviating the heart rhythm disturbance.

In addition, system 120 may be configured to administer other types oftreatment, to other areas of the body, including:

-   -   Magnetic stimulation of the brain, for indications including        depression, as well as other neurological and psychiatric        disorders.    -   Treatment of neurological (and particularly neuromuscular)        disorders, using magnetic fields to induce electrical pulses in        the spinal cord and peripheral nerves.    -   Treatment of muscular disorders, using magnetic fields applied        directly in the muscles.

Although the preferred embodiments described hereinabove refer tocertain exemplary types of flexible ferromagnetic cores and applicablewindings, other shapeable core and winding configurations will beapparent to those skilled in the art and are considered to be within thescope of the present invention. Similarly, whereas certain particulartherapeutic and diagnostic applications of systems 40 and 120 are shownand described above, the principles of the present invention may beapplied to substantially any method of treatment or diagnosis that usestargeted magnetic fields within the body.

It will therefore be appreciated that the preferred embodimentsdescribed above are cited by way of example, and that the presentinvention is not limited to what has been particularly shown anddescribed hereinabove. Rather, the scope of the present inventionincludes both combinations and subcombinations of the various featuresdescribed hereinabove, as well as variations and modifications thereofwhich would occur to persons skilled in the art upon reading theforegoing description and which are not disclosed in the prior art.

1. Apparatus for generating a localized magnetic field inside a body ofa living subject, the apparatus comprising: a first electromagnet,comprising a first core and a first winding surrounding the first core,and adapted to be positioned in proximity to the body so as to apply afirst magnetic field thereto; a second electromagnet, comprising asecond core and a second winding surrounding the second core, andadapted to be positioned in proximity to the body so as to apply asecond magnetic field thereto, the second core having a shape that canbe altered under control of an operator of the apparatus so as to adjustthe second magnetic field to assume a desired relation to the firstmagnetic field; and driving circuitry, coupled to apply an electricalcurrent to the first and second windings in order to generate the firstand second magnetic fields.
 2. Apparatus according to claim 1, whereinthe electrical current comprises a pulsed current, whereby applicationof the current to the windings causes the first and second magneticfields in the body to be pulsed.
 3. Apparatus according to claim 1,wherein the second magnetic field is adjusted in the desired relation soas to generate a region of focused magnetic flux due to the first andsecond magnetic fields within the body.
 4. Apparatus according to claim3, wherein the first and second electromagnets are positioned and atleast the second magnetic field is adjusted so that the focused magneticflux causes an electrical potential to be generated in a selected organof the body.
 5. Apparatus according to claim 4, wherein the selectedorgan comprises a heart.
 6. Apparatus according to claim 5, wherein thefirst and second electromagnets are positioned and adjusted, and whereinthe electrical current is controlled so that the electrical potentialcauses pacing of the heart.
 7. Apparatus according to claim 5, whereinthe first and second electromagnets are positioned and adjusted, andwherein the electrical current is controlled so that the electricalpotential causes defibrillation of the heart.
 8. Apparatus according toclaim 5, and comprising a device for observing performance of the heartand generating an output signal responsive thereto, wherein the firstand second magnetic fields are adjusted responsive to the output signal.9. Apparatus according to claim 1, wherein the shape of the first corecan be altered under control of the operator of the apparatus so as toadjust the first magnetic field.
 10. Apparatus according to claim 1,wherein at least the second core comprises at least first and secondferromagnetic sections and a joint that connects the sections one toanother, so as to permit adjustment of an angular relation of thesegments.
 11. Apparatus according to claim 1, wherein at least thesecond core comprises a flexible ferromagnetic material, which isadapted to be bent so as to permit adjustment of an angularconfiguration of the core.
 12. Apparatus for generating a localizedmagnetic field inside a body of a living subject, the apparatuscomprising: an electrical winding, which is adapted to be driven by anelectrical current so as to generate a magnetic field in the body; and acore, upon which the winding is wound, the core comprising at leastfirst and second ferromagnetic sections and a joint that connects thesections one to another, such that the joint is adjustable under controlof an operator of the apparatus so as to direct lines of flux of themagnetic field within the body.
 13. Apparatus for generating a localizedmagnetic field inside a body of a living subject, the apparatuscomprising: an electrical winding, which is adapted to be driven by anelectrical current so as to generate a magnetic field in the body; and acore, upon which the winding is wound, the core comprising a flexibleferromagnetic material, which is adapted to be bent under control of anoperator of the apparatus so as to direct lines of flux of the magneticfield within the body.
 14. Apparatus according to claim 13, wherein theflexible ferromagnetic material comprises a deformable plastic matrixand particles of a ferromagnetic substance contained in the matrix. 15.Apparatus according to claim 13, wherein the flexible ferromagneticmaterial comprises: a deformable container; a fluid held within thecontainer; and particles of a ferromagnetic substance suspended in thefluid.
 16. Apparatus according to claim 13, wherein the core comprisesmultiple lobes of the flexible ferromagnetic material, which are adaptedto be bent individually to respective angles.
 17. A method forgenerating a localized magnetic field inside a body of a living subject,the method comprising: positioning a first electromagnet, comprising afirst core and a first winding surrounding the first core, in proximityto the body so as to apply a first magnetic field thereto; positioning asecond electromagnet, comprising a second core and a second windingsurrounding the second core, in proximity to the body so as to apply asecond magnetic field thereto; and modifying a shape of at least one ofthe cores so that the first and second magnetic fields assume a desiredrelation one to another within the body.
 18. A method according to claim17, and comprising driving the first and second windings with a pulsedcurrent, so that the first and second magnetic fields in the bodycomprise pulsed fields.
 19. A method according to claim 17, whereinmodifying the shape comprises adjusting the shape of the at least one ofthe cores so as to generate a region of focused magnetic flux due to thefirst and second magnetic fields within the body.
 20. A method accordingto claim 19, wherein the first and second electromagnets are positionedand the shape of the at least one of the cores is modified so that thefocused magnetic flux causes an electrical potential to be generated ina selected organ of the body.
 21. A method according to claim 20,wherein the selected organ comprises a heart.
 22. A method according toclaim 21, and comprising driving the first and second windings with acurrent having an amplitude and waveform selected so that the electricalpotential causes pacing of the heart.
 23. A method according to claim21, and comprising driving the first and second windings with a currenthaving an amplitude and waveform selected so that the electricalpotential causes defibrillation of the heart.
 24. A method according toclaim 21, and comprising observing performance of the heart andgenerating an output signal responsive thereto, wherein the first andsecond electromagnets are positioned and the shape of the at least oneof the cores is modified responsive to the output signal.
 25. A methodaccording to claim 17, wherein modifying the shape comprises varying anangle of a joint that connects first and second sections of the at leastone of the cores one to another.
 26. A method according to claim 17,wherein the at least the one of the cores comprises a flexibleferromagnetic material, and wherein modifying the shape comprisesbending the core.
 27. Apparatus according to claim 4, wherein theselected organ comprises at least one of a brain, a nerve and a muscle.28. A method according to claim 20, wherein the selected organ comprisesat least one of a brain, a nerve and a muscle.